﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Customer.cs" company="Oliver Kurowski">
//    (c) Oliver Kurowski. All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace RegioKistl.Models
{
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    using RegioKistl.Resources;

    /// <summary>
    /// Customer definition: Basic information about the user and the delivery.
    /// </summary>
    public class Customer
    {
        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>
        /// The id.
        /// </value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the name of the account.
        /// </summary>
        /// <value>
        /// The name of the account.
        /// </value>
        [Display(Name = "AccountName", ResourceType = typeof(CustomerTexts))]
        public string AccountName { get; set; }

        /// <summary>
        /// Gets or sets the first name.
        /// </summary>
        /// <value>
        /// The first name.
        /// </value>
        [Required]
        [Display(Name = "FirstName", ResourceType = typeof(CustomerTexts))]
        public string FirstName { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        [Required]
        [Display(Name = "Name", ResourceType = typeof(CustomerTexts))]
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the address line1.
        /// </summary>
        /// <value>
        /// The address line1.
        /// </value>
        [Display(Name = "AddressLine1", ResourceType = typeof(CustomerTexts))]
        public string AddressLine1 { get; set; }

        /// <summary>
        /// Gets or sets the address line2.
        /// </summary>
        /// <value>
        /// The address line2.
        /// </value>
        [Display(Name = "AddressLine2", ResourceType = typeof(CustomerTexts))]
        public string AddressLine2 { get; set; }

        /// <summary>
        /// Gets or sets the address line3.
        /// </summary>
        /// <value>
        /// The address line3.
        /// </value>
        [Display(Name = "AddressLine3", ResourceType = typeof(CustomerTexts))]
        public string AddressLine3 { get; set; }

        /// <summary>
        /// Gets or sets the address line4.
        /// </summary>
        /// <value>
        /// The address line4.
        /// </value>
        [Display(Name = "AddressLine4", ResourceType = typeof(CustomerTexts))]
        public string AddressLine4 { get; set; }

        /// <summary>
        /// Gets or sets the zip code.
        /// </summary>
        /// <value>
        /// The zip code.
        /// </value>
        [Display(Name = "ZipCode", ResourceType = typeof(CustomerTexts))]
        public string ZipCode { get; set; }

        /// <summary>
        /// Gets or sets the city.
        /// </summary>
        /// <value>
        /// The city.
        /// </value>
        [Display(Name = "City", ResourceType = typeof(CustomerTexts))]
        public string City { get; set; }

        /// <summary>
        /// Gets or sets the email address.
        /// </summary>
        /// <value>
        /// The email address.
        /// </value>
        [EmailAddress]
        [Required]
        [Display(Name = "EmailAddress", ResourceType = typeof(CustomerTexts))]
        public string EmailAddress { get; set; }

        /// <summary>
        /// Gets or sets the remark.
        /// </summary>
        /// <value>
        /// The remark.
        /// </value>
        [Display(Name = "Remark", ResourceType = typeof(CustomerTexts))]
        public string Remark { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance can help in packing.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance can help in packing; otherwise, <c>false</c>.
        /// </value>
        [Display(Name = "CanHelpInPacking", ResourceType = typeof(CustomerTexts))]
        public bool CanHelpInPacking { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance can do book keeping.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance can do book keeping; otherwise, <c>false</c>.
        /// </value>
        [Display(Name = "CanDoBookKeeping", ResourceType = typeof(CustomerTexts))]
        public bool CanDoBookKeeping { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [needs box].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [needs box]; otherwise, <c>false</c>.
        /// </value>
        [Display(Name = "NeedsBox", ResourceType = typeof(CustomerTexts))]
        public bool NeedsBox { get; set; }

        /// <summary>
        /// Gets or sets the additional articles.
        /// </summary>
        /// <value>
        /// The additional articles.
        /// </value>
        [Display(Name = "AdditionalArticles", ResourceType = typeof(CustomerTexts))]
        public IEnumerable<AdditionalArticle> AdditionalArticles { get; set; }

        /// <summary>
        /// Gets or sets the type of the box.
        /// </summary>
        /// <value>
        /// The type of the box.
        /// </value>
        [Display(Name = "BoxType", ResourceType = typeof(CustomerTexts))]
        public BasicBoxType BoxType { get; set; }
    }

    public class BasicBoxType
    {
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }
    }

    public class AdditionalArticle
    {
        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name.
        /// </value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }
    }
}